package org.zachary.prosocialbehaviorservice.application.event_listener;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.transaction.event.TransactionalEventListener;
import org.zachary.prosocialbehaviorservice.domain.aggregate_model.activity.event.*;

@Slf4j
@Component
public class ActivityItemEventListener {
    @TransactionalEventListener
    public void onActivityItemAdd(AddActivityItemEvent event) {
        log.info("活动项目添加成功，活动项详情为：{}",event.getSource());
    }
    @TransactionalEventListener
    public void onActivityLinkItem(CreateActivityLinkItemEvent event) {
        log.info("活动类型与具体活动项建立连接成功，详情为：{}",event.getSource());
    }

    @TransactionalEventListener
    public void onActivityItemDelete(ActivityItemDeleteEvent event) {
        log.info("活动具体项目删除成功，详情为{}",event.getSource());
    }

    @TransactionalEventListener
    public void onActivityLinkItemDelete(ActivityLinkItemDelete event) {
        log.info("活动具体项目与活动类型连接删除成功，详情为{}",event.getSource());
    }
    @TransactionalEventListener
    public void onActivityItemModify(ModifyActivityItemEvent event) {
        log.info("活动具体项目修改成功，详情为{}",event.getSource());
    }


}
